import { requestShp } from "@/utils/http";
import { IResCategory } from '../category/model/categoryTypes'

/**
 * @description 获取一级分类
 * @returns 
 */
export const reqCategory1 = ()=> {
    return requestShp.get<IResCategory[]>('/admin/product/getCategory1')
}
/**
 * @description 获取二级分类
 * @returns 
 */
export const reqCategory2 = (id:number)=> {
    return requestShp.get<IResCategory[]>(`/admin/product/getCategory2/${id}`)
}
/**
 * @description 获取二级分类
 * @returns 
 */
export const reqCategory3 = (id:number)=> {
    return requestShp.get<IResCategory[]>(`/admin/product/getCategory3/${id}`)
}